PangoLayout *layout;
int text_height, baseline;
- width *= PANGO_SCALE;
- if (self->max_width_chars > -1)
- {
- int char_pixels, width_chars;
-
- layout = gtk_label_get_measuring_layout (self, NULL, -1);
- char_pixels = get_char_pixels (GTK_WIDGET (self), layout);
- if (self->width_chars > self->max_width_chars)
- width_chars = self->width_chars;
- else
- width_chars = self->max_width_chars;
- width = MIN (char_pixels * width_chars, width);
- }
- layout = gtk_label_get_measuring_layout (self, NULL, width);
+ layout = gtk_label_get_measuring_layout (self, NULL, width * PANGO_SCALE);
pango_layout_get_pixel_size (layout, NULL, &text_height);
<property name="halign">start</property>
<property name="valign">end</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">ABCDE
-ABCD</property>
- <property name="max_width_chars">4</property>
+ <property name="label" translatable="yes">ABCDE ABCD</property>
<attributes>
<attribute name="font-desc" value="Monospace"></attribute>
</attributes>